﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BotonJXC.Entity;
using PickingsDao = BotonJXC.DAO.PickingsDao;

namespace BotonJXC.BLL
{
    public class PickingsBLL : BaseBLL<PickingsDao, Pickings, int>
    {
        public PickingsBLL() { }
        //PickingsDao PickingsDao = new PickingsDao();
        /// <summary>
        /// 保存拣货单
        /// </summary>
        /// <param name="Pickings"></param>
        /// <returns></returns>
        public bool SavePickings(Pickings Pickings)
        {
            try
            {
                Dao.SavePickings(Pickings);
                return true;
            }
            catch (Exception)
            {
                return false;
                throw;


            }

        }

        /// <summary>
        /// 更新拣货单
        /// </summary>
        /// <param name="pickings"></param>
        /// <returns></returns>
        public bool updatePickings(Pickings pickings)
        {
            try
            {
                Dao.updatePickings(pickings);
                return true;
            }
            catch (Exception)
            {
                return false;
                throw;
            }
        }
        public PageModel<Pickings> FindPage(string PickingsSn, DateTime begintime, DateTime endtime, int start, int count)
        {
            return Dao.FindPage(PickingsSn, begintime, endtime, start, count);

        }

        public PageModel<Pickings> FindPage(Pickings pickings, int start, int count)
        {
            return Dao.FindByPage(null, null, start, count);
        }
    }
}
